/*      
 * 模块编号  
 * 功能描述 
 * 文件名 OrderFeignController.java 
 * 作者 王磊 
 * 编写日期 2022年01月16日 
 */
package wl.demo.springcloud.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import wl.demo.springcloud.entities.CommonResult;
import wl.demo.springcloud.entities.Payment;
import wl.demo.springcloud.service.PaymentFeignService;

@RestController
public class OrderFeignController
{
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id)
    {
        return paymentFeignService.getPaymentById(id);
    }
    
    @GetMapping(value = "/consumer/payment/feign/timeout")
    public String paymentFeignTimeOut()
    {
        return paymentFeignService.paymentFeignTimeOut();
    }
}
